<template>
  <div class="sendCommit">
    <myHead title="我的评价" background-color="#262A36"></myHead>
    <div class="CommitTop">
      <div class="income">
        <div class="income_content">
          <div>4.6/<span>5分</span></div>
          <div>综合评分</div>
        </div>
      </div>
      <div class="withdraw">共102条评价</div>
    </div>
    <div class="CommitCenter">
      <div>
        <div>4.2</div>
        <div>配送速度</div>
      </div>
      <div>
        <div>4.8</div>
        <div>服务态度</div>
      </div>
      <div>
        <div>4.6</div>
        <div>商品完整度</div>
      </div>
    </div>
    <div class="gray"></div>
    <div class="tab">
      <div v-for="(x,y) in tab" class="tab_box" @click="isTab(y)">
        <p :class="present == y?'':'selected'">{{x.text}}</p>
        <transition name="el-zoom-in-center">
          <p v-show="present == y"></p>
        </transition>
      </div>
    </div>
    <div class="CommitBot">
      <div class="list">
        <div class="left">
          <img src="../../../static/img/uhead.jpg" alt="">
        </div>
        <div class="right">
          <div class="right_top">
            <div>伊泽瑞尔</div>
            <div>2020-08-10 13:05</div>
          </div>
          <div class="right_center">
            <div>
              <van-icon name="star" color="#FFCC00" />
            </div>
            <div>配送4.0 服务4.0 商品4.0</div>
          </div>
          <div class="right_content">
            速度块，态度号！
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import myHead from "../../components/SendComponents/lib/myHead";
  import Vue from 'vue';
  import { Icon } from 'vant';

  Vue.use(Icon);

  export default {
    name: "sendAccount",
    components:{
      myHead
    },
    data() {
      return {
        tab: [
          {text: '全部评价'},
          {text: '好评'},
          {text: '差评'}
        ],
        present: 0,
      }
    },
    methods: {
      back() {
        this.$router.back();
      },
      isTab(index){
        this.present = index;
      },
    },
    mounted() {

    },
    watch: {

    }
  }
</script>

<style scoped>
  .sendCommit{
    padding-top: .48rem;
  }
  .sendCommit .CommitTop{
    height: 1.4rem;
    background-color: #262A36;
    text-align: center;
    color: #ffffff;
    padding-top: .2rem;
  }
  .sendCommit .CommitTop .income{
    border: 1px solid #EFBA00;
    width: .78rem;
    height: .78rem;
    margin: 0 auto .1rem;
    border-radius: .39rem;
  }
  .sendCommit .CommitTop .income .income_content{
    background-color: #ffffff;
    width: .74rem;
    height: .74rem;
    margin-top: .02rem;
    margin-left: .02rem;
    border-radius: .37rem;
    color: #333333;
  }
  .sendCommit .CommitTop .income .income_content div{
    width: 100%;
    height: .2rem;
    font-weight: bold;
  }
  .sendCommit .CommitTop .income .income_content div:nth-child(1){
    padding-top: .18rem;
    color: #F66A00;
    margin-bottom: .02rem;
  }
  .sendCommit .CommitTop .income .income_content div:nth-child(1) span{
    color: #333333;
  }
  .sendCommit .CommitTop .withdraw{
    text-align: center;
    line-height: .22rem;
    color: #ffffff;
    font-weight: bold;
  }
  .sendCommit .CommitCenter{
    display: flex;
    padding-top: .12rem;
  }
  .sendCommit .CommitCenter>div{
    width: calc(100% / 3);
    text-align: center;
    font-size: .15rem;
    color: #333333;
    font-weight: bold;
  }
  .sendCommit .CommitCenter>div div:nth-child(2){
    font-size: .12rem;
    margin-top: .05rem;
  }
  .sendCommit .gray{
    width: 100%;
    height: .08rem;
    background-color: #F5F5F5;
    margin: .2rem 0 0;
  }

  /* 费用分类部分 */
  .tab {
    width: 100%;
    height: 100%;
    max-height: .45rem;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    /*align-items: center;*/
    background-color: #ffffff;
  }

  .tab_box {
    height: 100%;
    width: calc(100% / 3);
    max-height: .55rem;
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    /*align-items: center;*/
    box-sizing: border-box;
    text-align: center;
  }

  .tab_box > p:nth-child(1) {
    color: #000000;
    font-size: .14rem;
    line-height: .14rem;
    padding: .15rem 0 .13rem;
    font-weight: bold;
  }

  .tab_box > p:nth-child(2) {
    width: 100%;
    height: .02rem;
    background-color: #FFD321;
    border-radius: .01rem;
  }

  .el-loading-spinner {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    min-height: 5rem;
  }

  .selected {
    color: #333333 !important;
    font-size: .12rem !important;
    font-weight: normal !important;
  }

  .CommitBot{
    margin-top: .1rem;
    background: #ffffff;
  }

  .sendCommit .CommitBot .list{
    display: flex;
    justify-content: space-between;
    padding: .12rem .15rem;
    border-bottom: 1px solid #F0F0F0;
  }
  .sendCommit .CommitBot .list .left{
    width: .4rem;
    height: .4rem;
    border-radius: .2rem;
    overflow: hidden;
    margin-right: .1rem;
  }
  .sendCommit .list .right{
    font-size: .15rem;
    color: #333333;
    flex-grow: 1;
  }
  .sendCommit .list .right .right_top{
    display: flex;
    justify-content: space-between;
  }
  .sendCommit .list .right .right_center{
    display: flex;
    font-size: .12rem;
    color: #999999;
    margin: .1rem 0;
  }
  .sendCommit .list .right .right_center>div:nth-child(2){
    margin-left: .1rem;
  }
  .sendCommit .list .right .right_content{
    color: #333333;
    font-size: .12rem;
  }
</style>
